package org.tony.spider.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import org.apache.commons.lang3.StringUtils;

public class CnStringUtil
{

  static final String regex = "，|。|！|？|《.*》|【.*】|（.*）";

  public static String removeCnSymbol(String source)
  {
    if (source == null)
    {
      return null;
    }
    if (StringUtils.isEmpty(source))
    {
      return source;
    }
    return source.replaceAll(regex, "");
  }

  public static void main(String[] args)
  {
    String str = "第95章山地阻截";
    //    String rex = "(\u7B2C.*\u7AE0)(.*)";
    String rex = "(.*)(\u7B2C.+\u7AE0.+)";
    Pattern p = Pattern.compile(rex);
    Matcher m = p.matcher(str);
    if (m.find())
    {
      System.out.println(m.group(1) + "," + m.group(2));
    }

  }
}
